1. Field of the Invention
The present invention is related to a pulse density mapping circuit which is utilized in conjunction with a delta-sigma modulator in order to correct for the extraneous 1's introduced in the output signal when the input signals are in the 50% range, and when the digital output is desired to be 0 for all negative going analog input signals.
2. Description of the Prior Art
In many sensor and other applications, it is desirable to convert an analog input signal having both positive and negative values to a pulse-density modulated signal through the use of a delta-sigma modulator. The pulse-density modulated signal can then be processed by a variety of digital signal processing circuits.
In some applications, it is desirable for the output pulse-density to be zero when the input signal is zero. For example, in some acceleration sensing applications, only positive acceleration values are of interest. In an automotive application, the positive polarity of acceleration may be defined as that which is directed from the front toward the rear of the vehicle. Therefore, the output pulse density must transition from zero to 100% as the input signal transitions from zero to fullscale. This is contrasted with the case in which the pulse density is 50% at zero input for an analog signal having both positive and negative excursions and then transitions between 0% and 100% as the input signal goes from negative to positive fullscale.
A delta-sigma modulator can be adjusted to a 0% pulse density at zero input signal, as required by applications such as that mentioned above. However, in situations where negative input signal polarities can exist, a negative input signal polarity can drive the circuit into saturation. Under these circumstances, when positive signal polarities return there can be a substantial delay before the circuit comes out of saturation and returns to proper operation. This may be undesirable since the function of the circuit is to respond immediately to positive signal polarities while ignoring negative ones.
A solution to the saturation problem can be achieved by adjusting the delta-sigma modulator circuit to deliver a 50% pulse density at zero input signal, and then incorporating a pulse density mapping circuit which converts the 50-to-100% pulse density range from the delta-sigma modulator circuit into a 0-to-100% pulse density range. All pulse densities less than 50% from the delta-sigma modulator would be mapped to 0%. This required performance of the pulse density mapping circuit is shown generally in FIGS. 1 and 2. This mapping allows the input signal to go negative without saturating the delta-sigma modulator circuit, while at the same time mapping only the positive portion of the input signal range into the full zero-to-100% pulse density range for processing by subsequent digital signal processing circuitry.
A simple prior art circuit for performing the above pulse density mapping can be configured using only a one-clock delay circuit and an AND gate, as shown in FIG. 3. The input of the circuit is coupled both to a one clock delay buffer 10 and to the input of an "AND gate" 20. The other input of the AND gate 20 is coupled to the output of the buffer 10. This circuit operates by outputting a 1 whenever both the current input is a 1 and the input on the previous clock cycle was also a 1. The input/output transfer function for this prior art circuit is illustrated, for several example pulse densities, in FIG. 5.
Clearly, the mapping shown in FIGS. 1 and 2 is being performed. There is a problem with this circuit, however, in that it functions properly only when the input pulse train does not contain both 11 and 00 pairs. As can be seen, none of the input pulse trains in FIG. 5 contain both 11 and 00 pairs, and in general the delta-sigma modulator output pulse train will contain only 00 pairs for pulse densities less than 50%, and only 11 pairs for pulse densities greater than 50%. The problem arises for a narrow range of pulse densities occurring around the 50% level of the analog input signal. Due to the inherently non-ideal behavior of the delta-sigma modulator in this 50% area, output pulse trains contain periodic "bursts" of both 11 and 00 pairs. These bursts are caused by the inability of any practical comparator, implemented as part of the delta-sigma modulator, to resolve infinitesimally small input signals.
An example of such a burst is shown in FIG. 6, where the input has twenty 1's in forty clock cycles. This signal defines a 50% pulse density, and therefore the output should contain no 1's. However, due to the 11 and 00 pairs in the input pulse train, the pulse density is incorrectly mapped to 10%, which is four 1's in forty clock cycles, by the simple pulse density mapping circuit illustrated in FIG. 3.
Although the specific binary pattern generated during a burst of 11 and 00 pairs is indeterminate, the pattern will have several definite characteristics. These characteristics, which can be proven by intuitive arguments, are also verifiable experimentally. First, if a 00 pattern occurs, then the next binary pair will necessarily be 11, and vice versa. Therefore, the 00 and 11 pairs will alternate. Second, for bursts of 00 and 11 pairs which occur at pulse densities slightly less than 50%, the first and last binary pair will be a 00 pair. Third, for bursts which occur at pulse densities slightly greater than 50%, the first and last binary pairs will be 11 pairs. Fourth, for each full burst, only a single extra 0 will be produced for pulse densities slightly less than 50%, or only a single extra 1 for pulse densities slightly greater than 50%. Fifth, bursts of alternating binary pairs can occur only when the pulse density is in close proximity to 50%. It can be concluded from these characteristics that bursts of alternating pairs of 00 and 11 are of no concern if the pulse density of the signal is measured directly by counting pulses for a period of time, since the alternating pairs cancel each other over time. However, if the pulse mapping function shown in the prior art is performed, the alternating binary pairs can cause serious distortion for pulse densities close to 50% as shown in FIG. 6.
The alternating nature of the 11 and 00 pairs within the bursts can be used to advantage in designing a circuit which does not produce the distortion described above for pulse densities close to the critical 50% level. The present invention includes additional circuitry for cancelling these spurious 00 and 11 pairs that occur around the 50% point.
Accordingly, it is an object of the present invention to receive the serial pulse train from a Delta Sigma modulator and map the serial pulse train to provide a series of 0's when the input is less than 50% and to provide a net increase in the number of 1's in the output signal when the input signal is greater than 50%. It is a second object of the present invention to eliminate extraneous 1's in the output signal when alternate 11 and 00 pairs are present at the input signal.